package com.aube.mis.enums;

public enum ResourceType {

	VIDEO("video"), STAGE_PHOTO("stagePhoto"), ACTOR("actor"), ITEM("item"), PRIZE("prize");

	private String code;

	ResourceType(String code) {
		this.code = code;
	}

	public String getCode() {
		return code;
	}

	public static ResourceType getEnumByCode(String code) {
		for (ResourceType e : ResourceType.values()) {
			if (e.getCode().equals(code)) {
				return e;
			}
		}
		return null;
	}
}
